package com.kly.chatter.db.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.kly.chatter.db.dao.ChatterOnlineListMatchRecordDao;
import com.kly.chatter.db.entity.ChatterOnlineListMatchRecordEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * User: yujianfu
 * Date: 2024-01-09
 * Time: 10:43:18.435
 */

@Repository
public class ChatterOnlineListMatchRecordDaoImpl extends AbstractBaseMapper<ChatterOnlineListMatchRecordEntity> implements ChatterOnlineListMatchRecordDao {

    @Override
    public List<ChatterOnlineListMatchRecordEntity> selectTodayByChatter(String chatterCode) {
        Map<String, Object> params = new HashMap<>();
        params.put("chatterCode", chatterCode);
        return getSqlSession().selectList(this.getStatement("selectTodayByChatter"), params);
    }

    @Override
    public void resetTodayUseCnt() {
        getSqlSession().update(this.getStatement("resetTodayUseCnt"));
    }
}